package com.pctx.sms.ronglian.controller;

import com.pctx.common.result.Result;
import com.pctx.sms.ronglian.SDKTestSendTemplateSMS;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by caolh on 2018/2/5.
 */
@CrossOrigin
@RestController
@RequestMapping("/sms")
public class SmsController {

    @RequestMapping("/ronglian")
    public Result verifyLogin(@RequestParam("mobile") String mobile)throws Exception{
        //@RequestParam 必须传该参数，不然报错
        String code= SDKTestSendTemplateSMS.getCode(mobile);
        Map map = new HashMap();
        map.put("1","xxx");map.put("2","yyy");
        return Result.success(code);
    }
}
